home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9795 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: magnet.at!nuucpgw!schmickl
  2. From: schmickl@magnet.at (Thomas M. Schmickl)
  3. Reply-To: schmickl@magnet.at
  4. Newsgroups: comp.lang.c++
  5. Distribution: world
  6. Subject: Window-Movements
  7. Date: 04 Mar 1996 14:21:18 GMT
  8. Message-ID: <3378249726.3026075@magnet.at>
  9. Organization: magnet Online Service
  10.  
  11. Are there any Hardcore-Windows-Gurus out there ???
  12.  
  13. Is it possible to move a window that has
  14. no border (Borderstyle:=bsNone) and now
  15. Title-bar without flickering.
  16.  
  17. On a window with titlebar, WINDOWS makes it by itself
  18. and moves only a thin border-Frame and moves
  19. the window to the new place if you lift the
  20. mousebutton up again.
  21. But for this, you have to hav a title bar.
  22.  
  23. I tried it this way, but it was not stisfying, because
  24. of too much flickering:(this Code is Pascal, but a solution in C++ would help
  25. too!!!)
  26.  
  27. Form.MouseDown:
  28.  XDown:=True;
  29.  
  30. Form.MouseMove:
  31.  if Xdown=true then
  32.  SetWindowPos(Self.handle,HWND_TOP,x,y,self.width,self.height,SWP_DRAWFRAME);
  33.  
  34. Form.MouseUp:
  35.  XDown:=False;
  36.  
  37. I used the API-Routine because I thought the use of the
  38. flag SWP_DRAWFRAME would cause Windows just to move the
  39. normal moving-frame, but it was no difference what flag
  40. I used there (SWP_HIDEWINDOW,SWP_NOZORDER...) it always
  41. was the same result: 
  42. The whole window was moved and redrawn,
  43. what caused the flicker.
  44.  
  45. I 've seen many programmes that are having no Borders
  46. and no Titlebar (for ex. all Toolbars in MS_OFFICE),
  47. that can be moved like normal windows, so there must
  48. be a solution for this.
  49.  
  50. I think it's just an API-Procedure, that causes a window
  51. to change to the moving-conditions, but I don't know how.
  52.  
  53. Answer please to
  54. SCHMICKL@magnet.at
  55.